﻿using Magic.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Magic.Application;

public interface ITestService
{
    string GetName();
}
[Injection(ServiceLifeTime.Transient)]
public class TestService : ITestService
{
    private readonly ITestRep _rep;
    public TestService(ITestRep rep)
    {

        _rep = rep;

    }
    public string GetName()
    {
        return _rep.GetName();
    }
}

public interface ITestRep
{
    string GetName();
}

[Injection(ServiceLifeTime.Transient)]
public class TestRep : ITestRep
{
    public string GetName()
    {
        return "小明";
    }
}
